package HLLibClasses;

import HLCode.HLClassManager;
import HLCode.HLLibClass;
import HLCode.HLObject;
import HLLib.base.HLString;
import HLLib.platform.HL91PayInfo;
import HLLib.platform.HL91Platform;

public class HLClass91Platform extends HLLibClass {
    public HLClass91Platform(HLClassManager owner) {
        super(owner);
    }

    public HLObject NewObject() {
        return new HL91Platform();
    }

    public void Execute(HLObject self, int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            ((HL91Platform) self).CheckVersion();
            break;
        }
        case 1: {
            ((HL91Platform) self).Login();
            break;
        }
        case 2: {
            ((HL91Platform) self).LoginEX();
            break;
        }
        case 3: {
            ((HL91Platform) self).Logout();
            break;
        }
        case 4: {
            ((HL91Platform) self).GuestRegist();
            break;
        }
        case 5: {
            if (resultOwnerObject == null) {
                ((HL91Platform) self).IsLogined();
            } else {
                resultOwnerObject.SetBoolean(resultIndex, ((HL91Platform) self).IsLogined());
            }
            break;
        }
        case 6: {
            ((HL91Platform) self).SwitchAccount();
            break;
        }
        case 7: {
            ((HL91Platform) self).EnterAccountManage();
            break;
        }
        case 8: {
            ((HL91Platform) self).EnterPlatform();
            break;
        }
        case 9: {
            if (resultOwnerObject == null) {
                ((HL91Platform) self).Buy((HLString)args.GetObject(0));
            } else {
                resultOwnerObject.SetObject(resultIndex, ((HL91Platform) self).Buy((HLString)args.GetObject(0)));
            }
            break;
        }
        case 10: {
            ((HL91Platform) self).BuyAysn((HL91PayInfo)args.GetObject(0));
            break;
        }
        case 11: {
            ((HL91Platform) self).GetProducts();
            break;
        }
        }
    }

    public void StaticExecute(int index, HLObject args, HLObject resultOwnerObject, int resultIndex) {
        switch (index) {
        case 0: {
            if (resultOwnerObject == null) {
                HL91Platform.sharePlatform();
            } else {
                resultOwnerObject.SetObject(resultIndex, HL91Platform.sharePlatform());
            }
            break;
        }
        }
    }
}
